package day10.Ti.StreamDome;

import java.util.ArrayList;

public class Ti01 {
    public static void main(String[] args) {
        ArrayList<String>list=new ArrayList<>();
        list.add("张三丰");
        list.add("郭襄");
        list.add("张启灵");
        list.add("周芷若");
        list.add("张靓颖");
        list.stream().forEach(s -> System.out.println(s));
        System.out.println("------");
        list.stream().filter(s -> s.startsWith("张")).forEach(s -> System.out.println(s));
        System.out.println("------");
        long l = list.stream().filter(s -> s.startsWith("张")).count();
        System.out.println(l);
    }
}
